<include file="public/header" />
<link rel="stylesheet" href="__ADMIN__/plugins/layui/iconpick.css" media="all" />
</head>
<body>
<div style="margin: 15px;" class="user-main">

	<div class="user-title">
		<span class="fl">添加新菜单</span>
		<div class="fr">
			<a href="{:url('Menu/index')}"><button type="button" class="layui-btn-normal layui-btn-small bn write borderr5 cu" ><i class=" fa fa-reply"></i></button></a>
		</div>
		<div class="clear"></div>
	</div>
	
	 <form class="layui-form mt20 J_ajaxForm"  action="{:url('Menu/add')}"  method="post">

			<div class="layui-form-item">
				<label class="layui-form-label">上级名称:</label>
				<div class="layui-input-inline layui-wd ">
					<select name="parentid" lay-search>
						<option value="0">作为一级菜单</option> 
						{$select_categorys}
					</select>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>菜单名称:</label>
				<div class="layui-input-inline layui-wd">
					<input type="text" class="layui-input"  name="name" value="">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图标</label>

				<div class="layui-inline layui-wd" style="width: 50%">
					<input type="text"  lay-verify="required" lay-vertype="tips"  name="icon" placeholder="图标" readonly id="iconpick" value="layui-icon layui-icon-table"  class="layui-input">
				</div>
				<div class="layui-inline">
					<a class="layui-btn layui-btn-primary fl-l mr-5 icon-pick" style="width: 41px;padding: 0 10px;"><i
							class="layui-icon layui-icon-table" style="font-size:18px;color:#76838f;"></i></a>
				</div>
			</div>

			<input type="hidden"  name="app" value="Htsoft">

			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>模块:</label>
				<div class="layui-input-inline layui-wd">
					<input type="text" class="layui-input"  name="model" id="model" value="">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>方法:</label>
				<div class="layui-input-inline layui-wd">
					<input type="text" class="layui-input"  name="action" id="action" value="">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">列表显示状态:</label>
				<div class="layui-input-inline layui-wd">
					<select name="status">
						<option value="0">隐藏</option>
						<option value="1">显示</option>
						
					</select>
				</div>
			</div>

			<div class="layui-input-block mt20">
				<a class="layui-btn layui-btn-normal" href="{:url('Menu/index')}">返回列表</a>
				<a class="layui-btn layui-btn-danger J_ajax_submit_addbtn"  >确认保存</a> 
		    </div> 		
	</form>
</div>
<include file="public/footer" />
</body>
<script type="text/javascript">
    layui.config({
        base: '__ADMIN__/plugins/layui/'
    }).extend({
        iconpick: 'iconpick'
    });
    layui.use(['layer','iconpick'],function() {
        let form = layui.form,
            iconpick = layui.iconpick;


        $("#iconpick").on('click', function (e) {
            $(".icon-pick").click();
            e.stopPropagation();
        });

        iconpick.pickinit('icon-pick', 'iconpick');
    });
</script>
</html>